Hybris UX Api
TMF667 - Post document
This operation allows you to create a QR Code.
URL
http://[localhost]:[port]/ecom-ux/v1/{businessId}/documentURL PARAMS
| name | type | description | required |
|---|---|---|---|
| businessId | String | 2 letter ISO 3166 country code (PA) identifying the business unit. | Y |
Headers
| name | type | description | required |
|---|---|---|---|
| client-id | String | The client-id identifying the channel. | Y |
| client-secret | String | Password associated with the client-id. | Y |
| client_id | String | The client_id identifying the channel. | Y (LC cloudhub) |
| client_secret | String | Password associated with the client_id. | Y (LC cloudhub) |
| X-Correlation-ID | String | Identifier that correlates HTTP request between a client and server. Any identification model (UUDI, checksum, etc.) can be used, as long as it is a unique value to differentiate a transaction. | Y for business |
Data Model - Request
| field name | type | description | required (mandatory-Y, optional-N |
|---|---|---|---|
| name | String | name for the QR code image to saved in emarsys | Y (PA, CWC) |
| documentType | String | Type of the documentType | N (PA, CWC) |
| characteristic[] | Array | Y (PA, CWC) | |
| characteristic[].valueType | String | valuetype for the characteristic field | Y (PA, CWC) |
| characteristic[].value | String | value for the characteristic field | Y(PA, CWC) |
| characteristic[].name | String | Name for the characteristic field | Y(PA, CWC) |
Data Model - Response
| field name | type | description | required (mandatory-Y, optional-N, Not applicable- N/A) |
|---|---|---|---|
| id | string | unique identifier | N (PA), N/A(CWC) |
| name | string | A string used to give a name to the document. | N (PA, CWC) |
| documentType | string | Name of the document type | N (PA, CWC) |
| status | string | A document status type (DocumentStatusType). The life cycle state of the document. | N (PA), N/A(CWC) |
| characteristic | array | A list of characteristics (Characteristic [*]). Describes a given characteristic of an object or entity through a name/value pair. | N (PA), Y(CWC) |
| characteristic.name | string | Name of the characteristic | N (PA), Y(CWC) |
| characteristic.valueType | string | Data type of the value of the characteristic. | N (PA, CWC) |
| characteristic.value | any | The value of the characteristic. | N (PA), Y(CWC) |
| attachment | array | A list of attachment ref or values (AttachmentRefOrValue [*]). An attachment by value or by reference. An attachment complements the description of an element, for example a picture. | N (PA), N/A(CWC) |
| attachment.id | string | Unique identifier for this particular attachment. | N (PA), N/A(CWC) |
| attachment.attachmentType | string | Attachment type such as picture. | N (PA), N/A(CWC) |
| attachment.mimeType | string | Attachment mime type such as extension file for picture. | N (PA), N/A(CWC) |
| attachment.name | string | The name of the attachment. | N (PA), N/A(CWC) |
| attachment.size | object | The size of the attachment. | N (PA), N/A(CWC) |
| attachment.size.amount | float | Numeric value in a given unit. | N (PA), N/A(CWC) |
| attachment.size.unit | string | Units | N (PA), N/A(CWC) |
| attachment.url | string | Remote reference to the content if web-addressable. | N (PA), N/A(CWC) |
characteristics - sub-resource
| field name | valueType | description | required(mandatory-Y, optional-N, Not applicable- N/A) | examples |
|---|---|---|---|---|
| characteristic[].name=="folderId" | integer | Customer address id | PA (Y for generating QRcode URL N/A for generating base64 format QRcode), N/A(CWC) | { "name": "folderId", "valueType": "integer", "value": TBD } |
| characteristic[].name=="height" | integer | Customer contact id | PA( Y for generating QRcode URL N/A for generating base64 format QRcode), N/A(CWC) | { "name": "height", "valueType": "integer", "value": 300 } |
| characteristic[].name=="width" | integer | business unit | PA( Y for generating QRcode URL N/A for generating base64 format QRcode), N/A(CWC) | { "name": "width", "valueType": "integer", "value": 300 } |
| characteristic[].name=="activationCode" | String | Customer location id | PA(Y for both), Y(CWC) | { "name": "activationCode", "valueType": "integer", "value": "LPA:1$sm-v4-099-a-gtm.pr.go-esim.com$0D7DBE1E622DD42E26A11DD09A04FE50" } |
Key considerations
For sample examples please refer the following URL - ECOM-UX Post Document
PA Implementation:
-API will support two ways to generate QRcode image:
1.generating the base64 content for the QRcode image.
- name will be static value. we can pass "eSIM".
- In the characteristic array, only pass the object with characteristic.name = "activationCode" as defined in the sub-resource data model. This value will be used to generate the QR code.
- please refer to below sample examples from specification url:
resquest - "PA_QRcode-Base64_request"in API specification
response - "PA_QRcode-Base64_response" in API specification
2.generating the URL of the QRcode via storing emarsys.
- The name field should specify the name of the QR code image to be stored in Emarsys. It must include a valid image file extension (e.g., "PA_esim_123123.jpg").
- In the characteristic array, include the following objects as defined in the sub-resource data model:
- characteristic.name = "activationCode" – to generate the QR code content
- characteristic.name = "height" – to define the image height
- characteristic.name = "width" – to define the image width
- characteristic.name = "folderId" – to indicate the folder name where the image should be stored in Emarsys
-please refer to below sample examples from specification url:
request - "PA_QRcode-URL_request"in API specification
response - "PA_QRcode-URL_response" in API specificationCWC Implementation (LC SuperApp):
1. This usecase is implemented to generate QRcode image.
2. This is implemented for CWC markets CWC-Anguilla(AI), CWC-Antigua(AG), CWC-British Virgin Islands (BVI)(VG), CWC-Cayman(KY), CWC-Dominica(DM), CWC-Grenada(GD), CWC-Jamaica(JM), CWC-Montserrat(MS), CWC-St Kitts(KN), CWC-StVincent(VC), CWC-Turks&Caicos(TC).
3. In the request payload, "name" will be static value should be sent as "eSIM".
4. In the request payload, when characteristic.name = "activationCode", characteristic[].value will be used to generate the QR code.
5. In the response payload, when characteristic[].name= "qrCode", characteristic[].value will be retrieved in base64 format (This content should be converted to qrcode image).
6. Please refer below sample examples from the below URL:
request - "LC_QRcode-Base64_request" in API specification
response - "LC_QRcode-Base64_response" in API specificationFor sample examples please refer the following URL - ECOM-UX Post Document